﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SingletonUnit
{
    /// <summary>
    /// 延迟初始化单例
    /// </summary>
    public sealed class LazySingleton : BaseSingleton
    {
        private LazySingleton() { }
        public static LazySingleton Instance { get { return Nested._instance; } }

        private class Nested
        {
            static Nested() { }
            internal static readonly LazySingleton _instance = new LazySingleton();
        }
    }
}
